import { useTabs } from "@/hooks/useTabs";
import "./index.css";
import { Tabs } from "antd-mobile";
import ItemList from "./components/ItemList";

const List = () => {
  const { channelList } = useTabs();

  return (
    <div className="tabContainer">
      <Tabs defaultActiveKey="0">
        {channelList.map((item) => (
          <Tabs.Tab key={item.id} title={item.name}>
            <div className="listContainer">
              {/* HomeList列表 */}
              <ItemList channelId={''+item.id} />
            </div>
          </Tabs.Tab>
        ))}
      </Tabs>
    </div>
  );
};

export default List;
